Window_MusicMenuList.prototype.initialize = function(helpWindow, x, y) {
    this._helpWindow = helpWindow;
    Window_Command.prototype.initialize.call(this, x, y);
    this.setHelpWindow(helpWindow);
    this._backgroundSprite = new Sprite();
    this._backgroundSprite.bitmap =
        ImageManager.loadBitmap('img/system/UI/', 'MenuBg_List');
    this.addChildAt(this._backgroundSprite, 0);
    this._backgroundSprite.x = -17;
    this._backgroundSprite.y = -1;
    this._currentPlaying = null;
  };

Window_MusicMenuList.prototype.windowWidth = function() {
    return 482;
};
  
Window_MusicMenuList.prototype.windowHeight = function() {
    return 480;
};

Window_MusicMenuList.prototype.makeCommandList = function() {
  var array = Yanfly.Param.MusicMenuSongList;
  var length = array.length;
  for (var i = 0; i < length; ++i) {
    var data = array[i];
    if (data.length > 1) {
      var ext = {
        name: data[0],
        volume: data[2],
        pitch: data[3],
        pan: data[4],
        description: ''
      }
      if ($gameSystem.isUnlockedMusicMenuSong(i)) {
        var name = data[1].trim();
        ext.description = data[5].trim();
        var enabled = true;
      } else {
        var name = Yanfly.Param.MusicMenuHiddenName.trim();
        ext.description = Yanfly.Param.MusicMenuHiddenHelp.trim();
        var enabled = false;
      }
      if(!!this.currentPlaying())
        if(ext.name==this.currentPlaying().name)
          enabled = false;

      this.addCommand(name, 'playsong', enabled, ext);
    }
  }
};

Window_MusicMenuList.prototype.drawItem = function(index) {
  var rect = this.itemRectForText(index);
  var align = this.itemTextAlign();
  this.resetTextColor();
  this.changePaintOpacity(this.isCommandEnabled(index));
  this.drawIcon(Yanfly.Param.MusicMenuIcon, rect.x + 2, rect.y + 2);
  var ibw = Window_Base._iconWidth + 4;
  var name = this.commandName(index);
  this.drawText(name, rect.x + ibw, rect.y, rect.width - ibw, align);
};

Window_MusicMenuList.prototype.itemTextAlign = function() {
  return 'left';
};

Window_MusicMenuList.prototype.setCurrentPlaying = function(ext) {
  this._currentPlaying = ext;
};

Window_MusicMenuList.prototype.currentPlaying = function() {
  return this._currentPlaying;
};